package com.framework.Module.REIM.imhistory;

import com.framework.Table.Table;
import com.framerock.baselib.Rock;

public class Tableimhistory extends  Table{
    

    protected void initTable() {
        this.tablename   = "imhistory";
        this.tablenamesm = "历史会话";

        this.flowsetMap  = Rock.getMap(new String[]{
                "type", "REIM",
                "sort", "951",
                "isxt", "2",
                "sortdir","optdt desc",
                "imgurl","https://xinhu-1251238447.file.myqcloud.com/img/17541.png",
                "istj","1"
        });

        this.addfields("type", "tinyint(1)", "0", "类型@0|单人,1|单位群,2|平台单人,3|平台组,4|应用信息,5|部门群",new String[]{
                "fieldstype","select"
        });
        this.addfields("receid", "int(11)", "0", "接收人ID");
        this.addfields("sendid", "int(11)", "0", "发送人ID");
        this.addfields("title", "varchar(100)", "", "标题", new String[]{
                "islb","1",
                "isss","1"
        });
        this.addfields("lastcont", "varchar(200)", "", "消息内容", new String[]{
                "islb","1",
                "fieldstype","textarea"
        });
        this.addfields("optdt", "datetime", null, "操作时间", new String[]{
                "islb","1",
        });

        this.addfields("cid", "int(11)", "0", "对应单位", new String[]{
                "islb","0",
                "islu","0",
        });
        this.addfields("lastid", "int(11)", "0", "最后消息ID");
        this.addfields("stotal", "int(11)", "0", "未读数");

        this.addfields("cid", "KEY", "`cid`", "单位ID");
        this.addfields("typereceid", "UNIQUE KEY", "`type`,`receid`,`sendid`", "主键");
    }
}
